﻿/*
 * ColorByCategory
 * 
 * initial implementation : 20.10.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using Petra.Gis.RenderingServices.PlanarBase;

namespace Petra.Gis.RenderingServices.GDIPlus
{

  public class ColorByCategory : SmartStyleComponent
  {




    public ColorByCategory()
    { 
      _definitions = new Dictionary<object,Color>();
    }





    protected Dictionary<object, Color> _definitions;

    public Dictionary<object, Color> Definitions
    {
      get { return _definitions; }
      set { _definitions = value; }
    }




    public override object GetComponentByValue(object value)
    {
      if (Definitions.ContainsKey(value))
        return Definitions[value];
      else
        return Color.Transparent;
    }



  }
}
